<!DOCTYPE html>
<html>
	<head>
		<title>myUpload</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="fr"/>
		
		<link rel="stylesheet" type="text/css" href="css/upload.css" media="screen, projection" />
		
		<script language="JavaScript" type="text/javascript" src="Scripts/jsscript.js"></script>
		<script language="JavaScript" type="text/javascript" src="Scripts/swfobject.js"></script>
		
	</head>
	<body>
	<img id="homepage" src="../img/gui/debut.png" />
	<div id="content" style="">
		<?php
		
		$adresses = array("natures_mortes"=>"uploads/large/natures_mortes/",
								"culinaire"=>"uploads/large/culinaire/",
								"travaux_personnels"=>"uploads/large/travaux_personnels/",
								"parutions"=>"uploads/large/parutions/",); //Adresse du dossier.
		if (isset($_POST['choix_dossier']) && $_POST['choix_dossier']!=""){
			$menu=$_POST['choix_dossier'];
			
		}else{
			$menu="culinaire";
		}
		?>
		<div id="deleteZone" style="">
			
		</div>
		<div id="uploadZone" style="width: 600px;">
			<form id="form_upload" name="form_upload" method="post" action="">
			<?php 
				  echo '<fieldset><legend>Choix du dossier de destination</legend>'; 
				  $check='';
				  foreach ($adresses as $nom => $adresse) {
					if ($nom==$menu){
						$check='checked="checked"';
					}else {
						$check='';
					  }
				  	echo '<input '.$check.'  type="radio"  name="choix_dossier" value="'.$nom.'"  onchange="hide(this.value);">'.$nom;
				  }
				  echo '</fieldset>';
			?>
				<div id="mon_flash">
						Pour uploader, vous devez telecharger <a href="http://www.adobe.com/go/getflashplayer_fr" onclick="window.open(this.href); return false;"><strong>le player flash</strong></a>
					</div>
					<script type="text/javascript">
						<?php echo 'var folder="'.$menu.'";'; ?>
						
						function hide(folders){	
							document.getElementById('folder1').style.display="none";
							document.getElementById('folder2').style.display="none";
							document.getElementById('folder3').style.display="none";
							document.getElementById('folder4').style.display="none";
							folder=folders;
							if(folder=="natures_mortes"){
								document.getElementById('folder1').style.display='block';
							}
							if(folder=="culinaire"){
								document.getElementById('folder2').style.display='block';
							}
							if(folder=="travaux_personnels"){
								document.getElementById('folder3').style.display='block';
							}
							if(folder=="parutions"){
								document.getElementById('folder4').style.display='block';
							}
							folder="varget=dossierup%3D"+folder;
							// <![CDATA[
							var so = new SWFObject("./applications/NasUploader16.swf", "nasuploader", "600", "450", "8");
							so.addParam ('FlashVars',folder);
							so.write("mon_flash");
							// ]]>
						}
						folder="varget=dossierup%3D"+folder;
						// <![CDATA[
						var so = new SWFObject("./applications/NasUploader16.swf", "nasuploader", "600", "450", "8");
						so.addParam ('FlashVars',folder);
						so.write("mon_flash");
						// ]]>
					</script>
				<br />
				<input type="button" name="btnSubmit" value="lancer l'upload" id="btnSubmit" onclick="goUpload('&variable2=val_variable2'); return false;">    
			</form>
	</div>
	</div>	
	</body>
</html>